import request from "@/utils/request"

// 当前激活数据
export function getNowData() {
  return request({
    url: "/dataManage/getNowData",
    method: "get",
  })
}

// 获取数据列表
export function getDataById(id) {
  return request({
    url: `/dataManage/getData/${id}`,
    method: "get",
  })
}

// 开始分析
export function dataAnalysis(data) {
  return request({
    url: "/dataPretreatment/dataAnalysis",
    method: "post",
    data
  })
}


// 储存
export function dataAnalysisSave(data) {
  return request({
    url: "/dataPretreatment/openAnalysis",
    method: "post",
    data
  })
}

// 修改
export function dataAnalysisUpdate(data) {
  return request({
    url: "/dataPretreatment/updateAnalysis",
    method: "post",
    data
  })
}

// list
export function dataAnalysisList() {
  return request({
    url: "/dataPretreatment/getAnalysisList",
    method: "get",
  })
}

// delete
export function dataAnalysisDel(id) {
  return request({
    url: `/dataPretreatment/deleteDate/${id}`,
    method: "post",
  })
}

// getInfo
export function dataAnalysisInfo(id) {
  return request({
    url: `/dataPretreatment/getDate/${id}`,
    method: "get",
  })
}

// 重命名
export function dataAnalysisSetName(id, name) {
  return request({
    url: `/dataPretreatment/updateName/${id}?name=${name}`,
    method: "post",
  })
}
